﻿using OA.Common;
using System.Web.Mvc;

namespace OA.Controllers.Common
{
    /// <summary>
    ///  关于验证码的控制器
    /// </summary>
    public class CaptchaController : Controller
    {
        /// <summary>
        ///  生成图形验证码
        /// </summary>
        /// <returns></returns>
        [AllowAnonymous]
        public ActionResult GenerateCaptcha()
        {
            var _bytes = CaptchaHelper.GenerateCaptcha();
            return File(_bytes, @"image/jpeg");
        }
    }
}